import createAxios from '../utils/axios'
// 博客导航
export const getnav = () => {
    return createAxios({
        url: '/api/blog/nav?page=1&page_size=200',
        method: 'GET',
    }, 'API1', {loading: false});
}
// 博客首页最新两条
export const getnewList = () => {
    return createAxios({
        url: '/api/blog/index?page=1&page_size=10',
        method: 'GET',
    }, 'API1', {loading: false});
}
//博客列表  type 不传 、  博客列表 type=2 公司信息
export const getnavList = (id: number, type?: number) => {
    return createAxios({
        url: `/api/blog/list?page=1&pagesize=200&classify_id=${id}&type=${type}`,
        method: 'GET',
    }, 'API1', {loading: false});
}
//博客侧栏
export const getsidebar = () => {
    return createAxios({
        url: '/api/blog/sidebar?page=1&page_size=10',
        method: 'GET',
    }, 'API1', {loading: false});
}
//博客详情
export const getdetail = (id: number) => {
    return createAxios({
        url: `/api/blog/detail?id=${id}`,
        method: 'GET',
    }, 'API1', {loading: false});
}